<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>05.选项配置_标题</title>
</head>
<body>
<!--
标题：title
  show:标题是否显示
  text：标题文字
  subtext：子标题
  left，top,right,bottom标题的位置
  borderColor边框颜色
  borderWidth边框宽度
-->

<div id="main" style="width: 600px;height:400px;"></div>

<script src="js/echarts.js"></script>
<script type="text/javascript">
  var myChart = echarts.init(document.getElementById('main'))

  var options = {
    //标题
    title: {
      show: true,
      text: 'ECharts 入门示例',
      subtext: '学习ECharts就来尚硅谷',
      left: 80,
      borderColor: 'red',
      borderWidth: 3
    },

    tooltip: {},
    legend: {
      data: ['前端课程']
    },
    xAxis: {
      data: ["HTML", "css", "Node", "JS基础",'JS框架', "移动端"]
    },
    yAxis: {},
    //数据
    series: [{
      name: '前端课程',
      type: 'bar',
      data: [5, 10, 10, 10, 35, 15]
    }]
  }

  myChart.setOption(options)
</script>
</body>

</html>
